การเปลี่ยนเส้นทาง การเชื่อมต่อ และการเชื่อมโยง ของ COMMAND.COM

Because DOS is a single-tasking operating system, piping is achieved by running commands sequentially, redirecting to and from a temporary file. COMMAND.COM makes no provision for redirecting the standard error channel.

command < filename Redirect standard input from a file or devicecommand > filename Redirect standard output, overwriting target file if it exists.command >> filename Redirect standard output, appending to target file if it exists.command1 | command2 Pipe standard output from command1 to standard input of command2command1 ¶ command2 Commands separated by ASCII-20 (¶, invoked by Ctrl+T) are executed in sequence (chaining of commands).[1] In other words, first command1 is executed until termination, then command2.[1] This is an undocumented feature in COMMAND.COM of MS-DOS/PC DOS 5.0 and higher.[1] It is also supported by COMMAND.COM of the Windows NT family as well as by DR-DOS 7.07. All versions of DR-DOS COMMAND.COM already supported a similar internal function utilizing an exclamation mark (!) instead (a feature originally derived from Concurrent DOS and Multiuser DOS) - however, in the single-user line this feature was only available internally (in built-in startup scripts like "!DATE!TIME") and indirectly through DOSKEY's $T parameter to avoid problems with ! as a valid filename character.[1] 4DOS supports a configurable command line separator (4DOS.INI CommandSep= or SETDOS /C), which defaults to ^.[8] COMMAND.COM in newer versions of Windows NT also supports a & separator for compatibility with the cmd syntax in OS/2 and the Windows NT family.[8] (cmd, however, does not support the ¶ separator.)

แหล่งที่มา

WikiPedia: COMMAND.COM http://www.allenware.com/mcsw/errorlevels.zip http://command.com/ http://www.antonis.de/dos/batchtut/battips/index.h... http://www.antonis.de/dos/dos-tuts/mpdostip/html/m... http://www.antonis.de/dos/dos-tuts/mpdostip/html/n... http://www.drdos.net/documentation/usergeng/07ugch... http://www.drdos.net/documentation/usergeng/uglont... http://www.freedos.org/technotes/technote/207.html https://www.auersoft.eu/soft/by-others/dos-exitcod... https://www.auersoft.eu/soft/by-others/dos-exitcod...